/**
 * 
 */
package org.aman.sprsecurity.common.security;

import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @Copyright: 本内容仅限于重庆爱赢科技有限公司内部使用，禁止转发. 
 * @Author: Administrator 2014年6月18日 上午11:02:16 
 * @Version: $Id$
 * @Desc: <p></p>
 */
public class MyPasswordEncoder implements PasswordEncoder {

    /* (non-Javadoc)
     * @see org.springframework.security.crypto.password.PasswordEncoder#matches(java.lang.CharSequence, java.lang.String)
     */
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        return encode(rawPassword).equals(encodedPassword);
    }

    /* (non-Javadoc)
     * @see org.springframework.security.crypto.password.PasswordEncoder#encode(java.lang.CharSequence)
     */
    public String encode(CharSequence rawPassword) {
        return rawPassword+"aa";
    }

}
